<?php
/**
 * 单开转多开数据同步记录公众号
 */
namespace Plug\multiSync\model;
defined('IN_IA') or exit('Access Denied');
use Model\Mod;

class MultiSyncModel extends Mod
{
    public function __construct()
    {
        $this->_table = 'kuyuan_red_multi_sync';
    }

    /**
     * 获取同步的数据指定数据表的总数
     * @param string $_table_name 数据表名字
     * @return int 返回数量
     */
    public function getSyncNumber($_table_name)
    {
        $_sql = "SELECT 
						count(`id`) 
					FROM
						".tablename($_table_name)."
					WHERE
					    uniacid = :uniacid
				";
        $_bind = array("uniacid"=>0);
        return pdo_fetchcolumn($_sql,$_bind);
    }
}
